package com.hxkj.client.service;

import com.github.pagehelper.PageInfo;
import com.hxkj.domain.po.DictType;
import com.platform.common.domain.result.ParameterDataStruct;
import com.platform.common.domain.result.ResultDataStruct;
import com.platform.common.domain.result.ResultMessageStruct;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;


/**
 * 一级字典列表 服务层
 * <p>
 * Created by zzx on 2018/5/15.
 */
@FeignClient(name = "cms-management")
public interface DictTypeServiceClient {
    /**
     * 获取一个字典列表  一 级（主类）
     *
     * @param
     * @param
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/dictType/getlist", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultDataStruct<PageInfo> getlist(@RequestBody ParameterDataStruct<DictType> parameterDataStruct) throws Exception;


    /**
     * 获取一个字典信息  一 级（主类）
     *
     * @param dictType
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/dictType/get", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultDataStruct<DictType> get(@RequestBody DictType dictType) throws Exception;

    /**
     * 新增字典     一 级（主类）
     *
     * @param dictType
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/dictType/save", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct saveDictType(@RequestBody DictType dictType) throws Exception;

    /**
     * 删除一个字典信息   一 级（主类）
     *
     * @param dictType
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/dictType/remove", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct deleteDictType(@RequestBody DictType dictType) throws Exception;

    /**
     * \
     * 修改一个字典信息   一 级（主类）
     *
     * @param dictType
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/dictType/modify", method = RequestMethod.POST, consumes = "application/json;charset=UTF-8")
    ResultMessageStruct updateDictType(@RequestBody DictType dictType) throws Exception;


    /**
     * 禁用一个 一级 字典
     * @param dictType
     * @return
     * @throws Exception
     */
    @RequestMapping(value = "/dictType/update",method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    ResultMessageStruct modifyDictType(@RequestBody DictType dictType) throws Exception;

    @RequestMapping(value = "/dictType/getDictType",method = RequestMethod.POST,consumes  ="application/json;charset=UTF-8")
    ResultDataStruct<DictType> getDictType(@RequestBody DictType dictType) throws Exception;

}


